Skip to content

running all-in-one openshift on localhost: lots of 403 #1352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TomasTomecek opened this issue Mar 18, 2015 · 5 comments · Fixed by #1389
Closed

running all-in-one openshift on localhost: lots of 403 #1352

TomasTomecek opened this issue Mar 18, 2015 · 5 comments · Fixed by #1389
Assignees

Comments

@TomasTomecek
Copy link
Contributor

Running it as openshift start --loglevel=5 --listen=https://127.0.0.1:8443/ --master=https://127.0.0.1:8443/

First error:

E0318 04:16:23.100578   32410 publish.go:61] Can't create master namespace: namespaces "default" already exists

and plenty of these:

E0318 04:16:23.553728   32410 master.go:398] Error creating namespace: &{{ } {master    10c2c53f-cd47-11e4-b68e-fa163ed7ae77  2015-03-18 04:16:23.552951598 -0400 EDT map[] map[]} {} {}} due to request [&{Method:POST URL:https://127.0.0.1:8443/v1beta1/namespaces Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[] Body:{Reader:} ContentLength:172 TransferEncoding:[] Close:false Host:127.0.0.1:8443 Form:map[] PostForm:map[] MultipartForm:<nil> Trailer:map[] RemoteAddr: RequestURI: TLS:<nil>}] failed (403) 403 Forbidden: Forbidden: "/v1beta1/namespaces" denied by default

E0318 04:16:23.725934   32410 reflector.go:85] Failed to list *api.Pod: request [&{Method:GET URL:https://127.0.0.1:8443/v1beta1/pods?fields=DesiredState.Host%3D&namespace= Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[] Body:<nil> ContentLength:0 TransferEncoding:[] Close:false Host:127.0.0.1:8443 Form:map[] PostForm:map[] MultipartForm:<nil> Trailer:map[] RemoteAddr: RequestURI: TLS:<nil>}] failed (403) 403 Forbidden: Forbidden: "/v1beta1/pods?fields=DesiredState.Host%3D&namespace=" denied by default

Looks like that everything ends with 403.

0.4.1 release

EDIT: auth setup:

OPENSHIFT_OAUTH_REQUEST_HANDLERS="requestheader,basicauth,session,bearer"
@deads2k
Copy link
Contributor

deads2k commented Mar 19, 2015

First error:

benign

@deads2k
Copy link
Contributor

deads2k commented Mar 19, 2015

Can you give a pastebin of the whole log, are you setting any authentication environment variables, and what is your authentication config?

@TomasTomecek
Copy link
Contributor Author

resolution: the issue was trailing slashes, therefore it should be:

--listen=https://127.0.0.1:8443 --master=https://127.0.0.1:8443

@deads2k
Copy link
Contributor

deads2k commented Mar 19, 2015

Just adding information as I find it. The issue isn't with the master config, it's with the generated .kubeconfig files. They include a server stanza like:

    server: https://127.0.0.1:8443/

which causes the client to build URLs like https://127.0.0.1:8443/v1beta1/deploymentConfigs?namespace= instead of https://127.0.0.1:8443/api./v1beta1/deploymentConfigs?namespace=

@deads2k
Copy link
Contributor

deads2k commented Mar 19, 2015

Alright, found it in the code. Feature, not a bug. The trailing / indicates a URL path. If you were hosting your API on a different context root, then this would be the only way you had to describe the "no prefix on my api" case. See code: https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/client/helper.go#L307.

@liggitt I think we should strip a trailing URL path / on the openshift command line, but allow them in the .kubeconfig and in the master.yaml files. That prevents common fat-fingering and delivers expected behavior, but still allows the construct. If you agree, I'll put it together.

jboyd01 pushed a commit to jboyd01/origin that referenced this issue Oct 17, 2017
…service-catalog/' changes from 3aacfedec6..aa27078754

aa27078754 origin build: add origin tooling
bcf37fd 0.1.0-rc2 chart updates (openshift#1410)
4ab0a0a add back 'Processing' message for instance deletion (openshift#1332)
0ecbcb1 Update logs for Cluster service plans. (openshift#1389)
8b491ef Fix a quoting nit (openshift#1400)
63685e4 add orphan mitigation-specific conditions for instances (openshift#1378)
adee662 Updated missed fields in service and plan specs (openshift#1406)
2095919 Handle default plan setting when using k8s names (openshift#1405)
607ba66 Document rbacEnable. (openshift#1404)
268294e Adding rbac definition for v1 api endpoint. (openshift#1284)
103288d differentiate between failed updates and provisions during deletion (openshift#1383)
eba8ba4 enable API aggregation and Service Catalog RBAC on Jenkins (openshift#1333)
5a93315 Validate relistDuration is non-negative (openshift#1395)
e279d21 Fix log messages for secrets (openshift#1385)
87fa8c9 fix status update when starting orphan mitigation (openshift#1372)
11f18f3 Switch to wget for integration apiserver checks (openshift#1384)
8c44a7d update OSB client to 2.13 (openshift#1392)
e64bbd1 default plan admission controller: filter list of service plans/service classes by the class name (openshift#1351)
6648c0e Check field names. Fix issue 1291 (openshift#1379)
5319841 update comment for instance generation check (openshift#1382)
7d5823f remove internal poll method (openshift#1381)
07d3068 Rework the logging for controller_instance. (openshift#1371)
5f4ca01 address PR comment as a followup (openshift#1380)
485d5e6 Add support for specifying plan using K8S names. (openshift#1377)
662bba8 Log number of secret keys created for binding credential (openshift#1375)
8ad6a31 Move controller constants into correct files (openshift#1373)
7bd66dd Adding type to log. (openshift#1339)
1ce5c4d Remove k8s/k8s dependency (openshift#1355)
b458323 Adding log formatting for BindingController. (openshift#1352)
275eb11 rename test variables to be consistent (openshift#1315)
ffd6b8b travis: skip cleanup before deploy (openshift#1368)
d5ecc04 fix travis tag checker (openshift#1365)
2cae0ee Minor updates to README (openshift#1360)
REVERT: 3aacfedec6 carry: Set external plan name for service-catalog walkthrough
REVERT: 3ec9e5b07a origin build: add origin tooling

git-subtree-dir: cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog
git-subtree-split: aa2707875461dd51be3731b1d94b5cfc3b9a3976
jpeeler pushed a commit to jpeeler/origin that referenced this issue Feb 1, 2018
* Adding log formatting for BindingController.

* Format log messages.

* Fixup logs with ClusterServiceClass.

* Fixed up the log format using 'type namespace/name:' format.:

* Fixing tests.

* Fixing texts.:

* Call to log had bad arguments.

* Reworking logs to not add to returned state objects. Thoughts?

* Update log wording based on feedback.:

* Fixing unit tests.
sttts pushed a commit to sttts/origin that referenced this issue Aug 26, 2019
…x-flexvolume

UPSTREAM: 65549: Fix flexvolumes in containerized envs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants