Learn and Be Curious

1. sql 오류수정


[movie-mybatis.xml]

SELECT * FROM (SELECT ROWNUM() AS RNUM, LIST.* FROM (
에서

SELECT * FROM (SELECT ROWNUM AS RNUM, LIST.* FROM (

으로


수정후 아래 영화목록이 보여야함



2. Secure gateway 설정


Connecting to 169.46.29.61:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.

Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-45-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage
Last login: Thu Apr  6 11:56:03 2017 from 125.143.162.194
root@instance-0056c14a:~# wget https://www.sudo.ws/sudo/dist/packages/Ubuntu/16.04/sudo_1.8.19-3_amd64.deb
--2017-04-06 15:19:40--  https://www.sudo.ws/sudo/dist/packages/Ubuntu/16.04/sudo_1.8.19-3_amd64.deb
Resolving www.sudo.ws (www.sudo.ws)... 65.102.237.118
Connecting to www.sudo.ws (www.sudo.ws)|65.102.237.118|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1497562 (1.4M) [application/octet-stream]
Saving to: 'sudo_1.8.19-3_amd64.deb'

sudo_1.8.19-3_amd64.deb                              100%[=====================================================================================================================>]   1.43M   412KB/s    in 3.6s   

2017-04-06 15:19:46 (412 KB/s) - 'sudo_1.8.19-3_amd64.deb' saved [1497562/1497562]

root@instance-0056c14a:~# dpkg -i sudo_1.8.19-3_amd64.deb
Selecting previously unselected package sudo.
(Reading database ... 16851 files and directories currently installed.)
Preparing to unpack sudo_1.8.19-3_amd64.deb ...
Unpacking sudo (1.8.19-3) ...
Setting up sudo (1.8.19-3) ...





root@instance-0056c14a:~# wget https://sgmanager.ng.bluemix.net/installers/ibm-securegateway-client-1.7.0+client_amd64.deb
--2017-04-06 15:28:44--  https://sgmanager.ng.bluemix.net/installers/ibm-securegateway-client-1.7.0+client_amd64.deb
Resolving sgmanager.ng.bluemix.net (sgmanager.ng.bluemix.net)... 158.85.156.18
Connecting to sgmanager.ng.bluemix.net (sgmanager.ng.bluemix.net)|158.85.156.18|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-debian-package]
Saving to: 'ibm-securegateway-client-1.7.0+client_amd64.deb'

ibm-securegateway-client-1.7.0+client_amd64.deb          [  <=>                                                                                                                 ]  11.48M  43.4MB/s    in 0.3s   

2017-04-06 15:28:45 (43.4 MB/s) - 'ibm-securegateway-client-1.7.0+client_amd64.deb' saved [12033964]


root@instance-0056c14a:~# dpkg -i ibm-securegateway-client-1.7.0+client_amd64.deb
Selecting previously unselected package ibm-securegateway-client.
(Reading database ... 16960 files and directories currently installed.)
Preparing to unpack ibm-securegateway-client-1.7.0+client_amd64.deb ...
[preinst] =============================================================================
[preinst] Started on: Thursday - April 06, 2017 - 15:29:58.437279709
[preinst] Running for userid: root with uid: 0
[preinst] The operation for this install is: install
[preinst] =============================================================================
[preinst] INFO: Performing install operation.
Stop and restart the client during install or upgrade? [y/n]?
[preinst] INFO:
[preinst] INFO: Creating the secgwadmin GID for Secure Gateway client.
[preinst] INFO: The group secgwadmin does not exist, creating it...
[preinst] INFO: The group secgwadmin was created successfully.
[preinst] INFO: Checking to make sure the GID for secgwadmin was created.
[preinst] INFO: Creating the secgwadmin UID for Secure Gateway client.
[preinst] INFO: The user secgwadmin does not exist, creating it without a homedir...
[preinst] INFO: The user secgwadmin was created successfully.
[preinst] INFO: Checking to make sure the homedir for secgwadmin was created.
[preinst] =============================================================================
[preinst] Completed with SUCCESS
[preinst] Ended on: Thursday - April 06, 2017 - 15:30:16.336764257
[preinst] =============================================================================
[preinst]
[preinst]
Unpacking ibm-securegateway-client (1.7.0) ...
Setting up ibm-securegateway-client (1.7.0) ...
[postinst] =============================================================================
[postinst] Started on: Thursday - April 06, 2017 - 15:30:18.676652046
[postinst] Running for userid: root with uid: 0
[postinst] The operation for this install is: configure
[postinst] =============================================================================
[postinst] INFO: Performing configure operation
[postinst] INFO: Checking if /var/empty is in filesystem
[postinst] WARNING: /var/empty is NOT in filesystem, creating it
[postinst] INFO: Checking if mail folder for /var/mail/securegateway is in filesystem
[postinst] INFO: Creating mail folder for /var/mail/securegateway
[postinst] INFO: Checking if /var/log/securegateway is in filesystem
[postinst] WARNING: /var/log/securegateway is NOT in filesystem, creating it
[postinst] INFO: Stop and restart the client during this installation: No
[postinst] WARNING: Either you entered No or the prompt to stop and restart the client lapsed!
[postinst] WARNING: The client will NOT be stopped and restarted during this installation.
[postinst] WARNING: You must stop and restart the client manually after the installation has completed.
Enter the gateway IDs, separated by spaces: o0024FlG5dw_prod_ng
[postinst] INFO:
[postinst] INFO: The gateway ID for this install is: o0024FlG5dw_prod_ng
Enter the gateway ID security tokens separated by spaces, enter 'none' for no security token:
[postinst] INFO:
[postinst] WARNING: The security token is not set
[postinst] INFO: Do you wish to change the startup logging level, values are INFO, DEBUG, ERROR or TRACE, default is INFO
Enter log level for each gateway separated by spaces. Enter 'none' or 'INFO' for default log level:
[postinst] INFO:
[postinst] INFO: The logging level for this secure gateway instance is defaults to: INFO
[postinst] INFO: Supply ACL File for processing [optional].
Supply ACL File each gateway separated by spaces. Enter none if no ACL file:
[postinst] INFO:
[postinst] INFO: The Access Control List (ACL) file for this gateway instance is NOT SET
Would you like to use the client UI (Y/N):
Please provide the port the run client UI, default is 9003:
[postinst] WARNING: Invalid value provided, setting port to default 9003.
[postinst] INFO: Your responses have been saved in the /etc/ibm/sgenvironment.conf configuration file.
Couldn't find an alternative telinit implementation to spawn.
Failed to connect to bus: No such file or directory
[postinst] INFO: Process securegateway_client is already stopped or was never started, continuing...
[postinst] INFO: Creating or updating auto-start configuration for your system
[postinst] INFO: Copying [/opt/ibm/securegateway/client/upstart/securegateway_clientd] file to /usr/local/bin...
[postinst] INFO: Chowning [/opt/ibm/securegateway/client/upstart/securegateway_clientd] file in /usr/local/bin to secgwadmin:secgwadmin...
[postinst] INFO: Chmoding [/opt/ibm/securegateway/client/upstart/securegateway_clientd] file in /usr/local/bin to 755...
[postinst] INFO: Copying [/opt/ibm/securegateway/client/upstart/securegateway_client.conf] file to /etc/init ...
[postinst] INFO: Copying [/opt/ibm/securegateway/client/upstart/securegateway_client.service] file to /lib/systemd/system...
Failed to connect to bus: No such file or directory
[postinst] INFO: Preparing to set permissions on directories and executable files...
[postinst] INFO: Checking the secgwadmin userid exists...
[postinst] INFO: Found user secgwadmin, checking the secgwadmin group exists...
[postinst] INFO: Found user and group secgwadmin, setting ownership and permissions for secgwadmin
[postinst] INFO: ...Setting ownership
[postinst] INFO: /bin/chown -R secgwadmin:secgwadmin /opt/ibm/node-v6.9.4-linux-x64
[postinst] INFO: ...Setting permissions
[postinst] INFO: /bin/chmod -R 755 /opt/ibm/node-v6.9.4-linux-x64/bin files...
[postinst] INFO: /bin/chmod -R 755 /opt/ibm/node-v6.9.4-linux-x64/lib/node_modules/npm/bin files...
[postinst] INFO: Checking if /usr/local/bin is in filesystem
[postinst] INFO: ...Symlinking IBM NODE into system
[postinst] INFO: /bin/ln -sf /opt/ibm/node-v6.9.4-linux-x64/bin/node /usr/local/bin/node
[postinst] INFO: /bin/ln -sf /opt/ibm/node-v6.9.4-linux-x64/bin/npm /usr/local/bin/npm
[postinst] INFO: /bin/ln -sf ../lib/node_modules/npm/bin/npm-cli.js /opt/ibm/node-v6.9.4-linux-x64/bin/npm
[postinst] INFO: Calling node install for production modules from /opt/ibm/securegateway
npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
ibm-bluemix-secure-gateway-client@1.7.0 /opt/ibm/securegateway/client
├─┬ async@2.0.1
│ └── lodash@4.17.4
├─┬ compression@1.6.1
│ ├─┬ accepts@1.3.3
│ │ └── negotiator@0.6.1

...................


npm WARN ibm-bluemix-secure-gateway-client@1.7.0 No repository field.
Couldn't find an alternative telinit implementation to spawn.
Failed to connect to bus: No such file or directory
[postinst] INFO: securegateway_client may or may not be running...
[postinst] INFO: Should we start or restart it? No
[postinst] WARNING: User had requested not to start the securegateway_client process,
[postinst] WARNING: it has to be started manually.
[postinst] INFO: +-PLEASE NOTE---------------------------------------------------------+
[postinst] INFO: | To run the client using a different gateway ID and other values you |
[postinst] INFO: | can update the /etc/ibm/sgenvironment.conf upstart environment file.|
[postinst] INFO: +---------------------------------------------------------------------+
[postinst] INFO: +-PLEASE NOTE---------------------------------------------------------+
[postinst] INFO: | The installer automatically enables auto-start daemon capability for|
[postinst] INFO: | systems that are supported. To disable, or enable it on systems that|
[postinst] INFO: | are not automatically supported, see the README markdown file. . . .|
[postinst] INFO: +---------------------------------------------------------------------+
[postinst] INFO: You can change the language for Secure Gateway client service logs in /etc/ibm/sgenvironment.conf
[postinst] =============================================================================
[postinst] Completed with SUCCESS
[postinst] Ended on: Thursday - April 06, 2017 - 15:31:09.761345913
[postinst] =============================================================================





root@instance-0056c14a:~# cd /opt/ibm/securegateway/client/
root@instance-0056c14a:/opt/ibm/securegateway/client# node lib/secgwclient.js o0024FlG5dw_prod_ng

IBM Bluemix Secure Gateway Client Version 1.7.0
************************************************************************************************
You  are running the  IBM Secure  Gateway Client for Bluemix. When you enter the provided docker
command the IBM Secure Gateway Client  for Bluemix automatically downloads as a Docker image and
is executed on your system/device. This is released under an IBM license. The  license agreement
for IBM  Secure Gateway Client for Bluemix is available at the following location:

http://www.ibm.com/software/sla/sladb.nsf/lilookup/986C7686F22D4D3585257E13004EA6CB?OpenDocument

Your use of the components of the package and  dependencies constitutes your acceptance  of this
license agreement. If you do  not want to accept the license, immediately quit  the container by
closing the  terminal  window or by  entering 'quit' followed by the ENTER key. Then, delete any
pulled Docker image from your device.

For client documentation, please view the ReadMe located at:
.rpm and .deb installers: /opt/ibm/securegateway/docs/
.dmg installer:           <installation location>/ibm/securegateway/docs/
.exe installer:           <installation location>\Secure Gateway Client\ibm\securegateway\docs\
************************************************************************************************


<press enter for the command line>
[2017-04-06 15:39:31.771] [INFO] (Client ID 1051) No password provided. The UI will not require a password for access
[2017-04-06 15:39:31.785] [WARN] (Client ID 1051) UI Server started. The UI is not currently password protected
[2017-04-06 15:39:31.786] [INFO] (Client ID 1051) Visit localhost:9003/dashboard to view the UI.
[2017-04-06 15:39:32.125] [INFO] (Client ID 1057) Setting log level to INFO
[2017-04-06 15:39:32.280] [INFO] (Client ID 1057) The Secure Gateway tunnel is connected
[2017-04-06 15:39:32.304] [INFO] (Client ID o0024FlG5dw_Og2) Your Client ID is o0024FlG5dw_Og2
[2017-04-06 15:39:32.306] [INFO] (Client ID o0024FlG5dw_Og2) Synchronizing ACL rules
o0024FlG5dw_Og2> acl allow :1521






[comm.properties 수정]

#****** Oracle sample **********************************************************
datasource.driverClass=oracle.jdbc.driver.OracleDriver
datasource.jdbcUrl=jdbc:oracle:thin:@sg-us-south-3-3.integration.ibmcloud.com:16984:xe
datasource.username=sds
datasource.password=sds
datasource.sql.path.ddl=classpath:/sql/ddl/oracle
datasource.sql.path.initdata=classpath:/sql/initdata/oracle
datasource.sql.path.mybatis=classpath:/sql/mybatis/oracle/**/*-mybatis.xml




SDS@SDS-PC C:\Users\SDS
$ cf push faro-myung2 -p C:\Users\SDS\workspace\Faro\target\faro-0.0.1.war -b https://github.com/cloudfoundry/java-buildpack.git  --no-manifest
Creating app faro-myung2 in org jesang.myung / space test as jesang.myung@gmail.com...
OK

Creating route faro-myung2.mybluemix.net...
OK

Binding faro-myung2.mybluemix.net to faro-myung2...
OK

Uploading faro-myung2...
Uploading app files from: C:\Users\SDS\AppData\Local\Temp\unzipped-app847300895
Uploading 3M, 1456 files
Done uploading
OK

Starting app faro-myung2 in org jesang.myung / space test as jesang.myung@gmail.com...
Creating container
Successfully created container
Downloading app package...
Downloaded app package (47.4M)
Staging...
-----> Java Buildpack Version: 6d7989a | https://github.com/cloudfoundry/java-buildpack.git#6d7989a
-----> Downloading Open Jdk JRE 1.8.0_121 from https://java-buildpack.cloudfoundry.org/openjdk/trusty/x86_64/openjdk-1.8.0_121.tar.gz (0.7s)
       Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (2.0s)
-----> Downloading Open JDK Like Memory Calculator 3.8.0_RELEASE from https://java-buildpack.cloudfoundry.org/memory-calculator/trusty/x86_64/memory-calculator-3.8.0_RELEASE.tar.gz (0.0s)
       Loaded Classes: 20085, Threads: 300, JAVA_OPTS: ''
-----> Downloading Container Certificate Trust Store 2.0.0_RELEASE from https://java-buildpack.cloudfoundry.org/container-certificate-trust-store/container-certificate-trust-store-2.0.0_RELEASE.jar (0.0s)
       Adding certificates to .java-buildpack/container_certificate_trust_store/truststore.jks (0.9s)
-----> Downloading Spring Auto Reconfiguration 1.10.0_RELEASE from https://java-buildpack.cloudfoundry.org/auto-reconfiguration/auto-reconfiguration-1.10.0_RELEASE.jar (0.1s)
       Modifying /WEB-INF/web.xml for Auto Reconfiguration
-----> Downloading Tomcat Instance 8.5.13 from https://java-buildpack.cloudfoundry.org/tomcat/tomcat-8.5.13.tar.gz (0.3s)
-----> Downloading Tomcat Lifecycle Support 2.5.0_RELEASE from https://java-buildpack.cloudfoundry.org/tomcat-lifecycle-support/tomcat-lifecycle-support-2.5.0_RELEASE.jar (0.0s)
-----> Downloading Tomcat Access Logging Support 2.5.0_RELEASE from https://java-buildpack.cloudfoundry.org/tomcat-access-logging-support/tomcat-access-logging-support-2.5.0_RELEASE.jar (0.0s)
Exit status 0
Staging complete
Uploading droplet, build artifacts cache...
Uploading droplet...
Uploaded build artifacts cache (54M)
Uploaded droplet (99.8M)
Uploading complete
Destroying container

0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
1 of 1 instances running

App started


OK

App faro-myung2 was started using this command `CALCULATED_MEMORY=$($PWD/.java-buildpack/open_jdk_jre/bin/java-buildpack-memory-calculator-3.8.0_RELEASE -totMemory=$MEMORY_LIMIT -stackThreads=300 -loadedClasses=21808 -poolType=metaspace) && echo JVM Memory Configuration: $CALCULATED_MEMORY &&  JAVA_HOME=$PWD/.java-buildpack/open_jdk_jre JAVA_OPTS="-Djava.io.tmpdir=$TMPDIR $CALCULATED_MEMORY -agentpath:$PWD/.java-buildpack/open_jdk_jre/bin/jvmkill-1.6.0_RELEASE=printHeapHistogram=1 -Djavax.net.ssl.trustStore=$PWD/.java-buildpack/container_certificate_trust_store/truststore.jks -Djavax.net.ssl.trustStorePassword=java-buildpack-trust-store-password -Djava.endorsed.dirs=$PWD/.java-buildpack/tomcat/endorsed -Daccess.logging.enabled=false -Dhttp.port=$PORT" exec $PWD/.java-buildpack/tomcat/bin/catalina.sh run`

Showing health and status for app faro-myung2 in org jesang.myung / space test as jesang.myung@gmail.com...
OK

requested state: started
instances: 1/1
usage: 1G x 1 instances
urls: faro-myung2.mybluemix.net
last uploaded: Thu Apr 6 16:22:43 UTC 2017
stack: cflinuxfs2
buildpack: https://github.com/cloudfoundry/java-buildpack.git

     state     since                    cpu      memory         disk         details
#0   running   2017-04-07 01:25:56 AM   151.6%   343.7M of 1G   196M of 1G






앱이 안올라오고 실패하면, 대시보드에서 app 지우고 다시 push하면 성공할 수 있음


'Cloud > Bluemix' 카테고리의 다른 글

MSA  (0) 2017.04.11
Data connect  (0) 2017.04.07
Cloud Tranformation Master Planning  (0) 2017.04.06
bluemix에 faro oracle 이미지 올리기  (0) 2017.04.06
API Connect  (0) 2017.04.05